<?php defined('KX_ROOT') || exit('Permission denied');?><!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
    <title>超级VIP - <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?></title>
    <link rel="stylesheet" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/css/global.css"/>
    <script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/flexible.min.js"></script>
</head>
<body>
<div class="w100">
    <div class="w100 bg-red flex-wrp flex-align-center flex-between lh100 plr15 ptb15">
        <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/return-white2.png" class="pt-return">
        <div class="size18 color1">超级VIP</div>
        <div></div>
    </div>
    <div class="bg-red color1 pt10 pl20">
        <img src="<?php echo $userinfo['avatar'];?>" alt="<?php echo $userinfo['nickname']?:$userinfo['name'];?>" class="pt-avatar">
        <div class="inline-block pl10" style="position: absolute; margin-top: 7px;">
            <?php $isvip=\Kuxin\Block::show('user.isvip', ['userid'=>$userinfo['id']]);?>
            <?php if($isvip):?>
            <h1 class="size16">尊敬的VIP会员您好</h1>
            <p class="size14">您的VIP于<?php echo \Kuxin\View::date($userinfo['vip_expire_time'],'Y-m-d');?>日到期，请您及时续费，以便给您带来不便</p>
            <?php else:?>
            <h1 class="size16">尊敬的用户您好</h1>
            <p class="size14">您还未开通超级VIP</p>
            <?php endif;?>
        </div>
    </div>
    <div class="bg-red bold pt20 mb10">
        <div class="bg-white" style="border-radius:20px 20px 0 0;padding: 20px;">
            <h1 class="size18 color32 mb10">开通超级VIP</h1>
            <ul class="pt-vip-recharge-list">
                <?php if(is_array(\Kuxin\Helper\Arr::getValue($_kxcms_config, "vip.list")) && (array()!=\Kuxin\Helper\Arr::getValue($_kxcms_config, "vip.list"))): $i=array(); $i['loop']=array_slice(\Kuxin\Helper\Arr::getValue($_kxcms_config, "vip.list"),0,null,true); $i['total']=count(\Kuxin\Helper\Arr::getValue($_kxcms_config, "vip.list")); $i['count']=count($i['loop']); $i['cols']=1; $i['add']=$i['count']%1?1-$i['count']%1:0; $i['order']=0; $i['row']=1;$i['col']=0;foreach(array_pad($i['loop'],$i['add'],array()) as $i['index']=>$i['list']): $loop=$i['list']; $i['order']++; $i['col']++; if($i['col']==1): $i['col']=0; $i['row']++; endif; $i['first']=$i['order']==1; $i['last']=$i['order']==$i['count']; $i['extra']=$i['order']>$i['count'];?>
                <li data-price="<?php echo $i['index'];?>">
                    <p class="mt10">&yen;<span class="size24"><?php echo $i['index'];?></span></p>
                    <span class="size14">(<?php echo $loop['name'];?>)</span>
                </li>
                <?php endforeach; endif;?>
            </ul>
            <p class="color62 size14 mt10 mb20">选择支付方式</p>
            <ul class="pt-pay-platform" style="margin-bottom: .5rem">
                <li class="flex-wrp flex-align-center mb20" data-platform="2">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/wx.png" class="mr10" style="height: .22rem;width:.22rem">
                    <span class="size14 lh100 color7">微信</span>
                </li>
                <li class="flex-wrp flex-align-center active" data-platform="1">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/alipay.png" class="mr10" style="height: .22rem;width:.22rem">
                    <span class="size14 lh100 color7">支付宝</span>
                </li>
            </ul>
            <button class="pt-login-btn color1 mt10 pt-submit" style="width:90vw;border-radius: 40px;">立即支付</button>
        </div>
    </div>
</div>

<!-- 底部版权 -->
<div class="pt-copyright">
    <div class="size12  w100 text-center mt15 mb10"><a title="隐私声明" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'privacy'],"");?>" class="color4">隐私声明</a> | <a title="免责声明" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'disdaimer'],"");?>" class="color4">免责声明</a> | <a title="关于我们" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'about'],"");?>" class="color4">关于我们</a></div>
    <div class="size12 color4 w100 text-center mb10">Copyright © 2009-<?php echo date(Y);?> <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "beian");?></div>
    <div class="size12  w100 text-center"><?php echo \Kuxin\Response::runinfo();?></div>
</div>
<!-- js -->
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/jquery-3.3.1.js"></script>
<script>
    $('.pt-return,.pt-recall').click(function(){
        window.history.back();
    });
    $('.pt-ellipsis').click(function(){
        $('.pt-tip').toggle()
    });
    $('.pt-tip .pt-tip-item').click(function(){
        $('.pt-tip').toggle()
    });
</script>
<div class="none">
    <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "tongji.mobile");?>
    <?php if(\Kuxin\Helper\Arr::getValue($_kxcms_config, "app.use_cdn")):?>
    <script src="/api/stat/novel/info.js"></script>
    <script src="/api/stat/novel/read.js"></script>
    <?php endif;?>
</div>
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/layer/mobile/layer.js"></script>
<script>
    $('.pt-vip-recharge-list li,.pt-pay-platform li').click(function () {
        $(this).addClass('active').siblings().removeClass('active');
    });
    $('.pt-submit').click(function () {
        var platform = $('.pt-pay-platform .active'),price = $('.pt-vip-recharge-list .active');
        if (!price.length){
            return  layer.open({content: '请选择开通时长',skin: 'msg',time: 2});
        }
        if (!platform.length){
            return  layer.open({content: '请选择支付方式',skin: 'msg',time: 2});
        }
        if (platform.length === 1 && price.length === 1) {
            window.location.href = '<?php echo \Kuxin\Helper\Url::build("user.pay.unifiedorder",['method'=>1,'type'=>2],"");?>&type_info=' + price.data('price') + '&platform=' + platform.data('platform')
        }
    });
</script>
</body>
</html>